fix: 배치율 허용 오차에 구조 하한(1주가/총액) 도입 — 적립 직후 오경보 예방#448
Merged
Conversation
5차 점검: 다음 달(8/1) 적립 입금 시나리오를 수치로 사전 검증하다 발견. 잔고 40만(30만+입금 10만)·KODEX 1주(12.8만) 보유 시 부족분 7.2만 < 1주라 매수가 보류되는 것이 설계인데, 그동안 배치율 32% vs 50%(-18%p)가 고정 허용 10%p를 넘어 정상 적립 과정이 약 2개월간 매일 ATTENTION을 울릴 상태였다(#447의 고정 허용치가 입금 직후 구조 미달을 미반영). 수정: - structural_deployment_tolerance(순수): max(설정 floor, 1주가/총액) — 적립 직후엔 자동 완화(40만 시점 32%p), 잔고가 크면 구조 하한이 저절로 조여져 floor가 지배(200만 시점 6.4%p < 10%p). 진짜 이상(매수 불능 → 미달 50%p)은 어느 시점에도 잡힌다. - run_health_check: 보유 포지션 최대 1주가로 유효 허용치 계산(포지션 조회 재사용, 추가 쿼리 없음) - baskets.yaml 주석: 설정값은 floor임을 명시 테스트: 8/1 시나리오(무경보)·매수불능(경보)·잔고 성장 시 자동 조임·입력 결손 폴백 4종 + 기존 허용치 테스트 유지. 실CLI 헬스 깨끗. 스위트 1656.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇
5차 점검 — 이번엔 다가올 운영 시나리오(8/1 적립 입금)를 수치로 사전 검증하다 발견한 오경보 예방.
발견
잔고 40만(30만+입금 10만)·KODEX 1주(12.8만) 보유 시:
고정 허용치가 '적립 직후의 구조적 미달(상한 = 1주 가격/총액)'을 반영하지 못한 설계 결함입니다.
수정
structural_deployment_tolerance(순수): 유효 허용 = max(설정 floor, 1주가/총액)검증